package com.weido.nettyServer.core;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

public class FilterAsist {
    public List<Filter> filters;
    public static Map<String, Filter> filterMap;


    public List<Filter> getFilters() {
        List<Filter> list = new ArrayList<>();
        Iterator<String> iterator = filterMap.keySet().iterator();
        while (iterator.hasNext()) {
            list.add(filterMap.get(iterator.next()));
        }

        return list;
    }

    public void setFilters() {
        List<Filter> list = new ArrayList<>();
        Iterator<String> iterator = filterMap.keySet().iterator();
        while (iterator.hasNext()) {
            list.add(filterMap.get(iterator.next()));
        }
        this.filters = list;
    }
}
